import { createRoot } from "react-dom/client";
import App from "./App";
import "./index.css";
import { ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";

const rootElement = document.getElementById("root");
if (rootElement) {
  const root = createRoot(rootElement);
  root.render(
    <ConfigProvider
      theme={{
        token: {
          // Seed Token，影响范围大
          // colorPrimary: "#00b96b",
          borderRadius: 2,

          // 派生变量，影响范围小
          // colorBgContainer: "#f6ffed",
        },
      }}
      locale={zhCN}
    >
      <App />
    </ConfigProvider>
  );
} else {
  console.error('Element with ID "root" not found in the DOM.');
}
